package util;

import java.awt.Container;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class BackgroundImage {
	
	public BackgroundImage(JFrame frame,Container container,String ImageName) {
		ImageIcon icon= new ImageIcon("res/" + ImageName);	
		
		final JLabel labelBackground = new JLabel();
		ImageIcon iconBookManageSystemBackground = icon;
		labelBackground.setIcon(iconBookManageSystemBackground);
		labelBackground.setBounds(0,0,iconBookManageSystemBackground.getIconWidth()
				,iconBookManageSystemBackground.getIconHeight());
		frame.getLayeredPane().add(labelBackground,new Integer(Integer.MIN_VALUE));
		JPanel panel = (JPanel)container;
		panel.setOpaque(false);
		
	}
	

}
